home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 25
/
AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso
/
Tools
/
SFX-Player
/
Mpeg
/
MrMPEG
/
ListLoad.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
2000-05-08
|
1KB
|
39 lines
/* ListLoad.rexx */
options results; parse arg mode; address MrMPEG
ASLFR_InitialDrawer = 0x80080009; ASLFR_InitialFile = 0x80080008
MUIA_List_Active = 0x8042391c; MUIA_List_Entries = 0x80421654
MUIA_ShowMe = 0x80429ba8; MUIV_List_Active_Bottom = -3
MUIV_List_Active_Top = -2
if mode ~= 0 then
aslrequest TITLE '"Load list"' ATTRS ASLFR_InitialDrawer "ENVARC:",
ASLFR_InitialFile "MrMPEG.list"
else result = "ENV:MrMPEG.list"
if open('List', result, 'r') = 1 then do
if mode = 1 then call Clear.rexx
list ID SLIST ATTRS MUIA_List_Entries; entries = result
do forever
temp = readln('List')
if eof('List') then leave
list ID SLIST INSERT NODUP POS MUIV_List_Active_Bottom STRING temp
end
call close('List')
list ID SLIST ATTRS MUIA_List_Entries; temp_max = result
setvar max temp_max
text ID MAX LABEL "\033b\033r"right(temp_max, 3)
temp_total_time = 0
do i = 0 to temp_max - 1
list ID SLIST POS i
parse var result dummy','temp_song_time','dummy2
temp_total_time = temp_total_time + left(temp_song_time, 2) * 60 + right(temp_song_time, 2)
end
temp_string = right(temp_total_time % 3600, 2, 0)||":"||,
right(temp_total_time // 3600 % 60, 2, 0)":"right(temp_total_time // 60, 2, 0)
setvar total_time temp_string
text ID TOTAL LABEL "\033b\033r"temp_string
if entries = 0 then list ID SLIST ATTRS MUIA_List_Active MUIV_List_Active_Top
end
return